<%@ page language="java" import="java.util.*,java.sql.*"
	pageEncoding="UTF-8"%>
<%@page import="dal.SQLHelper"%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>首页</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	</head>
	<body>
		<form action="login" method="post"> 
			Username: 
			<input type="text" name="username" />
			Password:
			<input type="password" name="password" />
			<input type="submit" value="登录" />
		</form>
		<h1>
			首页
		</h1>
		<hr />
		<div id="intro"  style="height:65%;border-right:1px solid black;width=27%;display:inline;padding:0 20px 0 0">
		<h2>小组展示</h2>
		<p>
		本小组成员有：<br/>
		欧阳骏峰<br/>
		李艾津<br/>
		
		</p>
		
		</div>
		<div id="news" style="height:65%;border-left:1px solid gray;width=70%;padding-left:1em;display:inline;overflow:scroll">
		<h2>
			新闻
		</h2>
		<%
			try {
				String strsql = "select * from jnews order by date ASC";
				ResultSet rs = SQLHelper.getResultSet(strsql);
				while (rs.next()) {
					out.println("<h3>");
					out.println(rs.getString(2));
					out
							.println("</h3><p><strong style=\"font-size:0.8em\">作者:");
					out.println(rs.getString(3) + "&nbsp;&nbsp;"
							+ rs.getString(4) + "</strong><br/>&nbsp;&nbsp;");
					out.println(rs.getString(5));
					out.println("</p><hr/>");
				}
			} catch (Exception e) {
				out.println(e.getMessage());
			}
		%>
		</div>
		<hr/>
		<center><p>©2010 javaeeHomeWork<br/> 
Powered by MyEclipse</p></center>
	</body>
</html>
